package com.example.school.exception;

import com.example.school.common.WrapMapper;
import com.example.school.common.Wrapper;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
public class GlobalExceptionHandler {


    @ExceptionHandler(Exception.class)
    public Wrapper globeException(Exception e){
        e.printStackTrace();
        return WrapMapper.error("全局");
    }


}
